package com.xuecheng.manage_cms.controller;

import com.xuecheng.api.cms.SysDicthinaryControllerApi;
import com.xuecheng.framework.domain.system.SysDictionary;
import com.xuecheng.manage_cms.service.SysService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sys")
public class SysDictionaryController implements SysDicthinaryControllerApi {
    @Autowired
    SysService sysService;
    @Override
    @GetMapping("dictionary/get/{dtype}")
    public SysDictionary getByType(@PathVariable("dtype") String type) {
        return sysService.findSysDictionaryByType(type);
    }
}
